package com.ky.facescan.api;




import com.ky.facescan.bean.base.BaseBean;
import com.ky.facescan.bean.scenic.MerchantBean;
import com.ky.facescan.bean.ticket.CheckTicketBean;
import com.ky.facescan.bean.ticket.CheckTicketBody;
import com.ky.facescan.bean.ticket.IdCardBean;
import com.ky.facescan.bean.user.AuthResultBean;
import com.ky.facescan.bean.user.LogoutBean;
import com.ky.facescan.bean.user.UserBean;

import java.util.List;
import java.util.Map;

import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

/**
 * 接口服务
 *
 * @Body RequestBody body
 * @Body ShopBasicDataBean  bean
 */
public interface ApiService {


    /**
     * 检票
     *
     * @param body
     * @return
     */
    @Headers("domainName:" + HostType.ticket)
    @POST("ticket-check-service/api/v2/ticket/kuaiying/check/checkv3")
    Observable<BaseBean<List<CheckTicketBean>>> checkTicketV3(@Body CheckTicketBody body);


    /**
     * 根据faceId查询身份证信息(destination-applet-service)
     *
     * @param params
     * @return
     */
    @Headers("domainName:" + HostType.ticket)
    @POST("ticket-check-service/api/unauth/applet/iotvsp/get_user")
    Observable<BaseBean<IdCardBean>> getIdCardByFaceId(@Body Map<String, Object> params);

    /**
     * 验证token是否有效
     *
     * @return
     */
    @Headers("domainName:" + HostType.ticket)
    @POST("ticket-check-service/api/v2/ticket/kuaiying/check/user/check_login")
    Observable<BaseBean<AuthResultBean>> checkToken();

    /**
     * 获取景点
     *
     * @param params
     * @return
     */
    @Headers("domainName:" + HostType.ticket)
    @POST("ticket-check-service/api/v2/ticket/kuaiying/check/user/scenic_spot_data")
    Observable<BaseBean<MerchantBean>> scenicSpotData(@Body Map<String, Object> params);

    /**
     * 登录验证
     *
     * @param params
     * @return
     */
    @Headers("domainName:" + HostType.ticket)
    @POST("ticket-check-service/api/v2/ticket/kuaiying/check/user/login")
    Observable<BaseBean<UserBean>> login(@Body Map<String, Object> params);

    /**
     * 登出
     *
     * @return
     */
    @Headers("domainName:" + HostType.ticket)
    @POST("ticket-check-service/api/v3/ticket/kuaiying/check/user/logout")
    Observable<BaseBean<LogoutBean>> logout();


}
